package com.study.web.service.sysparams.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.study.common.base.dao.BaseDao;
import com.study.common.base.service.BaseServiceImpl;
import com.study.common.exception.BizException;
import com.study.common.page.PageBean;
import com.study.common.page.PageParam;
import com.study.web.dao.sysparams.SysParamsDao;
import com.study.web.entity.SysParams;
import com.study.web.service.sysparams.SysParamsService;

/**
 * SysParamsServiceImpl.java
 * 
 * @author yaojinshan
 * @since 2018年6月14日下午2:42:54
 */
@Service("sysPaaramsServce")
public class SysParamsServiceImpl extends BaseServiceImpl<SysParams>implements SysParamsService {
	@Resource
	private SysParamsDao sysParamsDao;

	@Override
	protected BaseDao<SysParams> getDao() {
		return sysParamsDao;
	}

	/**
	 * 获取列表数据
	 * @param pageParam
	 * @param paramMap
	 * @return
	 * @throws BizException
	 */
	public PageBean getSysParamsListData(PageParam pageParam,Map<String, Object> paramMap) throws BizException{
		return sysParamsDao.getListData(pageParam, paramMap);
	}
	/**
	 * 新增数据
	 * @param sysParamsBuyPrize
	 * @return
	 * @throws BizException
	 */
	public Long saveSysParamsAddPageData(SysParams sysParams) throws BizException{
		return sysParamsDao.saveAddPageData(sysParams);
	};
	
	/**
	 * 修改数据
	 * @param sysParams
	 * @return
	 * @throws BizException
	 */
	public Long saveSysParamsUpdatePageData(SysParams sysParams) throws BizException{
		return sysParamsDao.saveUpdatePageData(sysParams);
	};
	
	/**
	 * 批量删除数据
	 * @param entityList
	 * @return
	 * @throws BizException
	 */
	public Long batchDeleteSysParamsData(List<SysParams> entityList) throws BizException{
		return sysParamsDao.batchDeleteData(entityList);
	};
	
	/**
	 * 获取所有的系统参数
	 * @return
	 * @throws BizException
	 */
	public List<SysParams> getAllSysParamsDataList(Map<String, Object> paramMap) throws BizException {
		return sysParamsDao.getAllDataList(paramMap);
	}
	
}
